//
//  YMGuideCollectionViewCell.m
//  YMMedical
//
//  Created by y s on 2023/7/13.
//

#import "YMGuideCollectionViewCell.h"



@interface YMGuideCollectionViewCell ()

@property (nonatomic, strong) UIImageView *imgvCell;

@end

@implementation YMGuideCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUI];
    }
    return self;
}

#pragma mark -- UI
- (void)setUI{
    self.contentView.backgroundColor = STheme.D9;
    [self.contentView addSubview:self.imgvCell];
    [self.imgvCell mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.height.mas_equalTo([SFitUtil fit:430]);
        make.centerY.mas_equalTo([SFitUtil fit:-82]);
    }];
    
}

- (void)setDict:(NSDictionary *)dict{
    _dict = dict;
    [SUIUtil setImage:self.imgvCell url:[SDataUtil stringOf:dict[@"url"] valid:@""]];
}

#pragma mark -- setter and getter
- (UIImageView *)imgvCell{
    if (_imgvCell == nil){
        _imgvCell = [[UIImageView alloc] init];
    }
    return _imgvCell;
}

@end
